﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="H2.NET.Web.Workflow.Inbox3"
    CodeBehind="Inbox3.aspx.cs" %>

<%@ Register src="../UserControls/Pager.ascx" tagname="Pager" tagprefix="uc1" %>
<%@ Register src="../UserControls/Toolbar.ascx" tagname="Toolbar" tagprefix="uc1" %>

<script type="text/javascript">
    function winOpenMonitor(strURL) {
        var sheight = screen.height - 150;
        var swidth = screen.width - 10;
        var winoption = "left=0,top=0,height=" + sheight + ",width=" + swidth + ",toolbar=yes,menubar=yes,location=yes,status=yes,scrollbars=yes,resizable=yes";
        var tmp = window.open(strURL, '', winoption);
        return false;
    }

    function winOpenForm(strURL, id) {
        //document.getElementById(id).style.display = "none";
        var sheight = screen.height - 150;
        var swidth = screen.width - 10;
        var winoption = "left=0,top=0,height=" + sheight + ",width=" + swidth + ",toolbar=yes,menubar=yes,location=yes,status=yes,scrollbars=yes,resizable=yes";
        var tmp = window.open(strURL, '', winoption);
        return false;
    }
    function TaskCancel(url, rel, title) {
        $.pdialog.open(url, rel, '<%=clsCmm.getTextValue("frm_inbox_btnCancel")%>', { width: 900, height: 500, mask: true });
        return false;
    }
</script>
<div class="pageHeader">
    <div class="searchBar" id="todolist_searchBar">
    <form id="pagerForm" onsubmit="return navTabSearch(this);" action="workflow/inbox3.aspx" method="post" runat="server">
        <asp:hiddenfield id="hf_type" runat="server"></asp:hiddenfield>
        <input type="hidden" name="pageNum" value="<%= PageNumber %>" />
        <input type="hidden" name="numPerPage" value="<%= PageSize %>" />
        <table class="searchContent">
            <tr>
                <td>
                    <%= clsCmm.getTextValue("frm_inbox_txtProcess")%>
                    <asp:dropdownlist id="drpProcess" runat="server" onchange="$('#pagerForm', navTab.getCurrentPanel()).submit()"></asp:dropdownlist>
                </td>
                <td>
                    <%=clsCmm.getTextValue("frm_initiate_txtStep")%>
                    <asp:dropdownlist id="drpStep" runat="server" onchange="$('#pagerForm', navTab.getCurrentPanel()).submit()"></asp:dropdownlist>
                </td>
                <td>
                    <label><%= clsCmm.getTextValue("frm_inbox_txtIncidentFrom")%></label>
                    <input type="text" runat="server" id="txtIncidentFrom" size="8" /> 至
                    <input type="text" runat="server" id="txtIncidentTo" size="8" />
                </td> 
                <td>
                    <%=clsCmm.getTextValue("frm_inbox_txtSummary") %>
                    <asp:TextBox ID="tb_Summary" runat="server" Width="194px"></asp:TextBox>
                </td>
            </tr>
        </table>
        <div class="subBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="submit">
                                <%=clsCmm.getTextValue("frm_inbox_btnSearch")%></button></div>
                    </div>
                </li>
            </ul>
        </div>
        </form>
    </div>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
           <uc1:Toolbar ID="Toolbar1" runat="server" />
        </ul>
    </div>
    <table class="table" width="100%" layouth="137">
        <thead>
            <tr>
                <th width="40" align="center">
                    <%=clsCmm.getTextValue("frm_inbox_gv_monitor")%>
                </th>
                <th width="40" align="center">
                    <%=clsCmm.getTextValue("frm_inbox_gv_status")%>
                </th>
                <th width="140" align="center">
                    <%=clsCmm.getTextValue("frm_inbox_gv_process_name")%>
                </th>
                <th>
                    <%=clsCmm.getTextValue("frm_inbox_gv_summary")%>
                </th>
                <th width="120" align="center">
                    <%=clsCmm.getTextValue("frm_inbox_gv_step_name")%>
                </th>
                <th width="140" align="center">
                    <%=clsCmm.getTextValue("frm_inbox_gv_start_time")%>
                </th>
                <th width="120" align="center">
                    <%=clsCmm.getTextValue("frm_inbox_gv_applicator")%>
                </th>
                <th width="50" align="center">
                    <%=clsCmm.getTextValue("frm_inbox_gv_incident_no")%>
                </th>
            </tr>
        </thead>
        <tbody>
            <asp:repeater id="gvInbox" runat="server">
                <ItemTemplate>
                    <tr rel='<%# Eval("taskid") %>' target="selectedId" style="height: 25px;line-height: 25px;">
                        <td><a href="javascript:;" onclick="return openDialog('<%# Eval("processname3")%>', 'workflow/monitor.aspx?TaskID=<%# Eval("taskid") %>', 1000, 600)" target="_blank"><img alt="<%=clsCmm.getTextValue("frm_inbox_img_alt")%>" border="0" src="../Resource/Images/<%# Eval("img_monitor") %>" width="16" height="16"></a></td>
                        <td><img alt="" border="0" src="../Resource/Images/<%# Eval("img_status") %>" width="16" height="16" /></td>
                        <td><a onclick="return winOpenForm('<%# Eval("openform") %>?TaskID=<%# Eval("taskid") %>','tr_row_<%# Eval("taskid") %>');"><%# GetCache(Eval("processname3").ToString()) %></a></td>
                        <td title='<%# Eval("summary").ToString().Split('/')[0]%><%# Eval("summary").ToString().Split('/').Count() > 1 ? "/"+Eval("summary").ToString().Split('/')[1].Trim(): ""%>'><a onclick="return winOpenForm('<%# Eval("openform") %>?TaskID=<%# Eval("taskid") %>','tr_row_<%# Eval("taskid") %>');"><%# Eval("summary").ToString().Split('/')[0]%><%# Eval("summary").ToString().Split('/').Count() > 1 ? "/"+Eval("summary").ToString().Split('/')[1].Trim(): ""%></a></td>
                        <td><%# GetCache(Eval("steplabel").ToString())%></td>
                        <td><%# Eval("starttime","{0:yyyy-MM-dd HH:mm}")%></td>
                        <td><%# Eval("initiator_name")%></td>
                        <td><%#Eval("incident")%></td>
                    </tr> 
                </ItemTemplate>
            </asp:repeater>
        </tbody>
    </table>
</div>
<uc1:Pager ID="Pager1" runat="server" />
